﻿using BugCatcher.Models;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using BugCatcher.Models;

namespace BugCatcher.Controllers
{
    public class HomeController : Controller
    {
        public ActionResult Index()
        {
            List<WorkItem> model = new List<WorkItem>();
            model.Add(new BugClass("Can't click on link", priority.High, "click the mouse"));
            model.Add(new BugClass("Page is Green", priority.High, "Open the Browser."));
            model.Add(new TaskClass("Browser won't open", priority.High, "Page won't load."));
            model.Add(new TaskClass("Computer exploded", priority.High, "I turned it on and it exploded."));
            return View(model);
        }

        public ActionResult About()
        {
            ViewBag.Message = "Your application description page.";

            return View();
        }

        public ActionResult Contact()
        {
            ViewBag.Message = "Your contact page.";

            return View();
        }


        //public ActionResult Bugs()
        //{
        //    BugClass model = new BugClass();
        //    model.Bugs = PopulateBug();
            

        //    return View(model);
        //}

        //public ActionResult Tasks()
        //{
        //    TaskClass model = new TaskClass();
        //    model.Tasks = PopulateBug();

        //    return View(model);
        //}

        //private static List<Bug> PopulateBug()
        //{
        //    List<Bug> model = new List<Bug>();
        //    model.Add(new BugClass(){
        //        Text = "Submit Button Doesn't work.",
        //        DateCreated = DateTime.Now,
        //        Type = priority.High,
        //        StepsToReproduce = "I type the info into fields and press 'Submit'",
                
        //    });
        //    model.Add(new TaskClass()
        //    {
        //        Text = "Submit Button Doesn't Work.",
        //        DateCreated = DateTime.Now,
        //        Type = priority.High,
        //        Description = "More Details..."
        //    });
        //    return model;
        //}


      
    }
}